<template>
  <ul class="contact-container">
    <li>
      <a href="">
        <div class="icon">
          <Icon type="github" />
        </div>
        <p>Upting@.git</p>
      </a>
      <div class="pop">
        <img
          src="https://img1.baidu.com/it/u=2648389307,756086504&fm=26&fmt=auto"
          alt=""
        />
      </div>
    </li>
    <li>
      <a href="">
        <div class="icon">
          <Icon type="QQ" />
        </div>
        <p>23424234@qq.com</p>
      </a>
    </li>
    <li>
      <a href="mailto:23423424234@qq.com">
        <div class="icon">
          <Icon type="email" />
        </div>
        <span>23423424234@email</span>
      </a>
    </li>
    <li>
      <a href="">
        <div class="icon">
          <Icon type="weixin" />
        </div>
        <p>23424234@qq.com</p>
      </a>
      <div class="pop">
        <img
          src="https://img1.baidu.com/it/u=2648389307,756086504&fm=26&fmt=auto"
          alt=""
        />
      </div>
    </li>
  </ul>
</template>

<script>
import Icon from "@/components/Icon";
export default {
  components: {
    Icon,
  },
};
</script>

<style lang="less" scoped>
@import "~@/style/var.less";
@import "~@/style/global.less";
.contact-container {
  list-style: none;
  padding: 20px;
  margin: 0;
  li {
    position: relative;
    // 定义一个高度变量
    @itemHeight: 30px;
    &:hover {
      .pop {
        transform: scaleY(1);
      }
    }
    a {
      display: flex;
      align-items: center;
      height: @itemHeight;
      line-height: @itemHeight;
      color: @gray;
      font-size: 14px;
      cursor: pointer;
      .icon {
        width: 18px;
        margin-right: 5px;
      }
    }
    .pop {
      position: absolute;
      left: 0;
      bottom: @itemHeight + 5px;
      background: cornflowerblue;
      transform: scaleY(0);
      transform-origin: bottom center;
      transition: 0.3s;
      img {
        display: block;
        width: 150px;
        height: 150px;
      }
      &::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -4px;
        transform: translateX(-50%) rotate(-45deg);
        width: 0px;
        height: 0px;
        border: 4px solid;
        border-color: transparent transparent #fff #fff;
      }
    }
  }
}
</style>